#!/bin/sh
#
# see: dh_installdeb(1)

set -e

package="bb-beaglebone-io-installer"

cleanup () {
	if [ -d /usr/local/lib/node_modules/beaglebone-io/ ] ; then
		rm -rf /usr/local/lib/node_modules/beaglebone-io/ || true
	fi

	if [ -d /var/cache/bb-beaglebone-io-installer/ ] ; then
		rm -rf /var/cache/bb-beaglebone-io-installer/ || true
	fi
}

case "$1" in
    configure)
	cleanup
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

